Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

-1(s(x), s(y)) → -1(x, y)
GCD(s(x), y, s(z)) → MIN(x, z)
GCD(x, s(y), s(z)) → -1(max(y, z), min(y, z))
GCD(s(x), y, s(z)) → MAX(x, z)
MIN(s(x), s(y)) → MIN(x, y)
GCD(s(x), y, s(z)) → -1(max(x, z), min(x, z))
GCD(s(x), s(y), z) → MAX(x, y)
GCD(s(x), s(y), z) → MIN(x, y)
GCD(s(x), s(y), z) → GCD(-(max(x, y), min(x, y)), s(min(x, y)), z)
GCD(s(x), s(y), z) → -1(max(x, y), min(x, y))
GCD(s(x), y, s(z)) → GCD(-(max(x, z), min(x, z)), y, s(min(x, z)))
MAX(s(x), s(y)) → MAX(x, y)
GCD(x, s(y), s(z)) → GCD(x, -(max(y, z), min(y, z)), s(min(y, z)))
GCD(x, s(y), s(z)) → MAX(y, z)
GCD(x, s(y), s(z)) → MIN(y, z)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

-1(s(x), s(y)) → -1(x, y)
GCD(s(x), y, s(z)) → MIN(x, z)
GCD(x, s(y), s(z)) → -1(max(y, z), min(y, z))
GCD(s(x), y, s(z)) → MAX(x, z)
MIN(s(x), s(y)) → MIN(x, y)
GCD(s(x), y, s(z)) → -1(max(x, z), min(x, z))
GCD(s(x), s(y), z) → MAX(x, y)
GCD(s(x), s(y), z) → MIN(x, y)
GCD(s(x), s(y), z) → GCD(-(max(x, y), min(x, y)), s(min(x, y)), z)
GCD(s(x), s(y), z) → -1(max(x, y), min(x, y))
GCD(s(x), y, s(z)) → GCD(-(max(x, z), min(x, z)), y, s(min(x, z)))
MAX(s(x), s(y)) → MAX(x, y)
GCD(x, s(y), s(z)) → GCD(x, -(max(y, z), min(y, z)), s(min(y, z)))
GCD(x, s(y), s(z)) → MAX(y, z)
GCD(x, s(y), s(z)) → MIN(y, z)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 9 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

-1(s(x), s(y)) → -1(x, y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


-1(s(x), s(y)) → -1(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(-1(x1, x2)) = (15/4)x_2   
POL(s(x1)) = 1/2 + (13/4)x_1   
The value of delta used in the strict ordering is 15/8.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MAX(s(x), s(y)) → MAX(x, y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MAX(s(x), s(y)) → MAX(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(s(x1)) = 5/4 + (15/4)x_1   
POL(MAX(x1, x2)) = x_1 + (13/4)x_2   
The value of delta used in the strict ordering is 85/16.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MIN(s(x), s(y)) → MIN(x, y)

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MIN(s(x), s(y)) → MIN(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(MIN(x1, x2)) = (15/4)x_2   
POL(s(x1)) = 1/2 + (13/4)x_1   
The value of delta used in the strict ordering is 15/8.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

GCD(s(x), s(y), z) → GCD(-(max(x, y), min(x, y)), s(min(x, y)), z)
GCD(s(x), y, s(z)) → GCD(-(max(x, z), min(x, z)), y, s(min(x, z)))
GCD(x, s(y), s(z)) → GCD(x, -(max(y, z), min(y, z)), s(min(y, z)))

The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


GCD(s(x), s(y), z) → GCD(-(max(x, y), min(x, y)), s(min(x, y)), z)
GCD(s(x), y, s(z)) → GCD(-(max(x, z), min(x, z)), y, s(min(x, z)))
GCD(x, s(y), s(z)) → GCD(x, -(max(y, z), min(y, z)), s(min(y, z)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(-(x1, x2)) = 1/4 + x_1   
POL(max(x1, x2)) = x_1 + x_2   
POL(GCD(x1, x2, x3)) = (3/2)x_1 + (2)x_2 + (2)x_3   
POL(s(x1)) = 11/4 + (4)x_1   
POL(min(x1, x2)) = (1/2)x_1 + (3/4)x_2   
POL(0) = 0   
The value of delta used in the strict ordering is 15/4.
The following usable rules [17] were oriented:

min(0, y) → 0
min(x, 0) → 0
max(x, 0) → x
min(s(x), s(y)) → s(min(x, y))
max(s(x), s(y)) → s(max(x, y))
max(0, y) → y
-(s(x), s(y)) → -(x, y)
-(x, 0) → x



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

min(x, 0) → 0
min(0, y) → 0
min(s(x), s(y)) → s(min(x, y))
max(x, 0) → x
max(0, y) → y
max(s(x), s(y)) → s(max(x, y))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
gcd(s(x), s(y), z) → gcd(-(max(x, y), min(x, y)), s(min(x, y)), z)
gcd(x, s(y), s(z)) → gcd(x, -(max(y, z), min(y, z)), s(min(y, z)))
gcd(s(x), y, s(z)) → gcd(-(max(x, z), min(x, z)), y, s(min(x, z)))
gcd(x, 0, 0) → x
gcd(0, y, 0) → y
gcd(0, 0, z) → z

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.